<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <title>批改中心</title>
    <link href="css/font-awesome.min.css" rel="stylesheet" />
    <link href="css/bootstrap.min.css" rel="stylesheet" />
    <link href="css/templatemo-style.css" rel="stylesheet" />
    <script src="https://code.jquery.com/jquery-3.2.1.min.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/js/bootstrap.min.js"></script>
    <script src="js/vue.min.js"></script>
    <script src="js/api.js"></script>
  </head>

  <body>
    <div class="templatemo-flex-row">
      <div class="templatemo-sidebar">
        <div class="mobile-menu-icon">
          <i class="fa fa-bars"></i>
        </div>
        <nav class="templatemo-left-nav">
          <ul>
            <li>
              <a href="考试中心.html"
                ><i class="fa fa-map-marker fa-fw"></i>考试中心</a
              >
            </li>
            <li>
              <a href="试题中心.html"
                ><i class="fa fa-database fa-fw"></i>试题中心</a
              >
            </li>
            <li>
              <a href="成绩中心.html"
                ><i class="fa fa-bar-chart fa-fw"></i>成绩中心</a
              >
            </li>
            <li>
              <a class="active"
                ><i class="fa fa-star" aria-hidden="true"></i>批改中心</a
              >
            </li>
            <li>
              <a href="个人信息.html"
                ><i class="fa fa-user-o" aria-hidden="true"></i>个人信息</a
              >
            </li>
            <li>
              <a href="index.html"><i class="fa fa-eject fa-fw"></i>退出</a>
            </li>
          </ul>
        </nav>
      </div>
      <div class="templatemo-content col-1 light-gray-bg">
        <div class="templatemo-content-container">
          <div
            class="templatemo-flex-row flex-content-row templatemo-overflow-hidden"
          >
            <div class="col-1 templatemo-overflow-hidden">
              <div
                class="templatemo-content-widget white-bg templatemo-overflow-hidden"
              >
                <div class="templatemo-flex-row flex-content-row">
                  <div id="app" class="container">
                    <form class="form-horizontal">
                      <div class="form-group">
                        <div class="col-xs-3">
                          <select
                            id="selectProfession"
                            class="form-control"
                            @change="changeOption"
                            :disabled="recordList.length != 0"
                          >
                            <option value="-1">---请选择---</option>
                            <option
                              v-for="item in relevanceList"
                              :value="item.profession_no"
                              >{{ item.profession_name }}
                            </option>
                          </select>
                        </div>

                        <div class="col-xs-3">
                          <select
                            id="selectCourse"
                            class="form-control"
                            :disabled="recordList.length != 0"
                            @change="changeOption"
                          >
                            <option value="-1">---请选择---</option>
                            <option
                              v-for="item in relevanceList"
                              :value="item.course_no"
                              >{{ item.course_name }}</option
                            >
                          </select>
                        </div>
                      </div>

                      <div class="form-group">
                        <label class="col-sm-2 control-label">题目</label>
                        <textarea
                          readonly="true"
                          rows="10"
                          cols="80"
                          style="resize:none"
                          >{{ record.question }}</textarea
                        >
                      </div>

                      <div class="form-group">
                        <label class="col-sm-2 control-label"
                          >学生作答({{ index + 1 }}/{{
                            recordList.length
                          }})</label
                        >
                        <textarea
                          readonly="true"
                          rows="10"
                          cols="80"
                          style="resize:none"
                          >{{ record.context }}</textarea
                        >
                      </div>
                      <div class="form-group">
                        <label class="col-sm-2 control-label">得分</label>
                        <div class="col-sm-1">
                          <input
                            id="mark"
                            type="text"
                            class="form-control"
                            :disabled="disabled"
                            oninput="value=value.replace(/[^\d]/g,'')"
                            @input="getMark"
                            :value="record.mark"
                          />
                        </div>
                      </div>

                      <div class="form-group">
                        <div class="col-sm-offset-2 col-sm-10">
                          <button
                            id="preQuestion"
                            type="button"
                            class="btn btn-primary"
                            :disabled="predisabled"
                            @click="changeRecord"
                            :value="index - 1"
                          >
                            上一份
                          </button>
                          <button
                            id="nextQuestion"
                            type="button"
                            class="btn btn-primary"
                            :disabled="nextdisabled"
                            @click="changeRecord"
                            :value="index + 1"
                          >
                            向一份
                          </button>

                          <button
                            type="button"
                            class="btn btn-default"
                            :disabled="disabled"
                            @click="submit"
                          >
                            提交
                          </button>
                        </div>
                      </div>
                    </form>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
    </div>

    <script src="js/批改中心.js"></script>
  </body>
</html>
